package us.wili.dev.model.base;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import us.wili.dev.common.model.BaseModelWithId;

public class BaseOrder extends BaseModelWithId implements Serializable {
    @ApiModelProperty(value="用户id")
    private Long userid;

    @ApiModelProperty(value="收件人")
    private String shipname;

    @ApiModelProperty(value="收货地址")
    private String address;

    @ApiModelProperty(value="联系方式")
    private String shipphone;

    @ApiModelProperty(value="1待付款 2待发货 3待收货")
    private Long type;

    @ApiModelProperty(value="订单总价")
    private BigDecimal orderTotalprice;

    @ApiModelProperty(value="订单编号")
    private Long orderNum;

    @ApiModelProperty(value="商品")
    private String goods;

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public String getShipname() {
        return shipname;
    }

    public void setShipname(String shipname) {
        this.shipname = shipname == null ? null : shipname.trim();
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getShipphone() {
        return shipphone;
    }

    public void setShipphone(String shipphone) {
        this.shipphone = shipphone == null ? null : shipphone.trim();
    }

    public Long getType() {
        return type;
    }

    public void setType(Long type) {
        this.type = type;
    }

    public BigDecimal getOrderTotalprice() {
        return orderTotalprice;
    }

    public void setOrderTotalprice(BigDecimal orderTotalprice) {
        this.orderTotalprice = orderTotalprice;
    }

    public Long getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(Long orderNum) {
        this.orderNum = orderNum;
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods == null ? null : goods.trim();
    }

    public void copyPropertiesFrom(BaseOrder source) {
        this.setUserid(source.getUserid());
        this.setShipname(source.getShipname());
        this.setAddress(source.getAddress());
        this.setShipphone(source.getShipphone());
        this.setType(source.getType());
        this.setOrderTotalprice(source.getOrderTotalprice());
        this.setOrderNum(source.getOrderNum());
        this.setGoods(source.getGoods());
    }

    public void copyAndIgnoreNullFrom(BaseOrder source) {
        if (source.getUserid() != null) {
            this.setUserid(source.getUserid());
        }
        if (source.getShipname() != null) {
            this.setShipname(source.getShipname());
        }
        if (source.getAddress() != null) {
            this.setAddress(source.getAddress());
        }
        if (source.getShipphone() != null) {
            this.setShipphone(source.getShipphone());
        }
        if (source.getType() != null) {
            this.setType(source.getType());
        }
        if (source.getOrderTotalprice() != null) {
            this.setOrderTotalprice(source.getOrderTotalprice());
        }
        if (source.getOrderNum() != null) {
            this.setOrderNum(source.getOrderNum());
        }
        if (source.getGoods() != null) {
            this.setGoods(source.getGoods());
        }
    }
}